<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>脱离文档流特点</title>
    <style>
        .box1 {
            float: left;
            width: 400px;
            height: 400px;
            background-color: #bfa;
        }

        .box2 {
            /* box1 内部是独立的块上下文, 布局方式可以按照文档流规则处理*/
            width: 100px;
            height: 100px;
            background-color: pink;
            margin: 0 auto;
        }
        span {
            float: right;
            width: 500px;
            height: 500px;
            background-color: yellow;
        }
    </style>
</head>
<body>
<!--
    浮动会开启独立的 BFC 块格式化上下文, 不再遵循文档流的规则
-->
<div class="box1">
    abc
    <div class="box2"></div>
</div>
<span>span</span>
</body>
</html>